#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define int long long

vector<int> a;
int check(int x) {
    int ret = 0;
    for(auto s : a) {
        ret += s / x;
    }
    return ret;
}
signed main() {
    int n, k;
    int ans = 0;
    cin >> n >> k;
    for(int i = 0; i < n; i++) {
        int temp;
        cin >> temp;
        ans += temp;
        a.push_back(temp);
    }
    if(ans < k) {
        cout << 0 << endl;
        return 0;
    }
    sort(a.begin(), a.end());
    int l = 0, r = a[n - 1];
    int ret = 0;
    while(l <= r) {
        int mid = l + (r - l) / 2;
        int temp = check(mid);
        if(temp >= k) {
            l = mid + 1;
            ret = mid;
        }else{
            r = mid - 1;
        }
    }
    cout << ret << endl;
    return 0;
}